﻿using GiaoTrinhEPU.Repositories.DataModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GiaoTrinhEPU.Repositories.Interfaces
{
   public  interface IAuthorRepository
    {
        void CreateAuthor(Author item);
        void UpdateAuthor(Author item);
        void DeleteAuthor(int id);

        IEnumerable<AuthorModel> ListAuthors(bool cacheEnabled = true);
        Author GetAuthorById(int id);

        bool HasNameExisted(String name);
        bool HasNameDuplicated(int id, String name);
    }
}
